1. Field of the Invention
This invention relates to the field of system-level programming for a computer system in which a processor has multiple operating modes.
2. Description of the Related Art
Virtualization has brought many advantages to the world of computers. As is well known in the art, a virtual machine (VM) is a software abstraction—a “virtualization”—of an actual physical computer system that runs as a “guest” on an underlying “host” hardware platform. As long as a suitable interface is provided between the VM and the host platform, one advantage is that the operating system (OS) in the guest need not be the same as the OS at the system level in the host. For example, applications that presuppose a Microsoft Windows OS can be run in the VM even though the OS used to handle actual I/O, memory management, etc., on the host might be Linux.
It usually requires less than 10% of the processing capacity of a CPU to run a typical application, although usage may peak briefly for certain operations. Virtualization can more efficiently use processing capacity by allowing more than one VM to run on a single host, effectively multiplying the number of “computers” per “box.” Depending on the implementation, the reduction in performance is negligible, or at least not enough to justify separate, dedicated hardware “boxes” for each user.
Still another advantage is that different VMs can be isolated from and completely transparent to one another. Indeed, the user of a single VM will normally be unaware that he is not using a “real” computer, that is, a system with hardware dedicated exclusively to his use. The existence of the underlying host will also be transparent to the VM software itself.
As individuals, companies, schools, governments and other organizations transition from 32-bit hardware platforms, 32-bit OSs and 32-bit applications toward 64-bit hardware platforms, 64-bit OSs and 64-bit applications, there will be a need and/or a desire to execute 32-bit OSs and/or 32-bit applications on a 64-bit hardware platform. The AMD and Intel architectures provide some capabilities for executing 32-bit OSs and/or 32-bit applications (as well as 16-bit OSs and 16-bit applications) on the 64-bit processors, using different operating modes. Specifically, the x86-64 architecture, for example, includes a long mode and a legacy mode. The long mode requires a 64-bit OS, while the legacy mode is used with 32-bit and 16-bit OSs, along with 32-bit and 16-bit applications. The long mode includes two sub-modes, namely a 64-bit mode and a compatibility mode. The 64-bit mode is used for executing 64-bit applications and the compatibility mode is used for executing 32-bit and 16-bit applications under a 64-bit OS. The 64-bit version of the Microsoft Windows XP™ OS and 64-bit versions of Linux currently provide support, or are developing support, for executing 32-bit applications and drivers in the compatibility mode of the x86-64 processor. When in the legacy mode, the processor operates substantially the same as an x86 processor, at least from the perspective of system software and applications, including a protected mode, a virtual-8086 mode and a real mode. The operating modes of the x86-64 architecture, along with many other aspects of the processor, are described in detail in the AMD64 Architecture Programmer's Manual (“the AMD64 Manual”). The 64-Bit Extension Technology Software Developer's Guide provides similar information for Intel's platform.
The capabilities provided by the x86-64 architecture for executing 32-bit OSs and 32-bit applications are limited, however. For example, the x86-64 architecture does not provide the capability of executing multiple OSs at the same time.